<?php
class FileSystemManager {
  public static function parseDirectory($path, $recursivityLng=1)
  {
    $entry = new FileSystemEntry($path);
    if( !$entry->isDir() ){
      throw new FileSystemManagerException(sprintf("Le chemin '%s' n'est pas un dossier", $path));
    }
    $entry->getContent();
    return $entry;
  }
}